package cn.itcast.bos.service.take_delivery;

import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;

public interface PromotionService {
	//保存宣传数据
	void save(Promotion model);
	//分页查询
	Page<Promotion> findPage(Pageable pageable);
	//根据page和rows分页查询活动信息
	@Path("/pageQuery")
	@GET
	@Produces({ "application/xml", "application/json" })
	PageBean<Promotion> pageQuery(@QueryParam("page") int page,@QueryParam("rows") int rows);
	
	@Path("/showDetail/{id}")
	@GET
	@Produces({ "application/xml", "application/json" })
	Promotion findById(@PathParam("id") Integer id);
	
	// 设置活动过期
	void updateStatus(Date date);
}
